Xbasic

STOD Function

Syntax

DDate as D = stod(C cDate )

Arguments

cDateCharacter

A character representation of a date in the format YYYYMMDD.

Returns

DDateDate

A date value.

Description

Convert a date in YYYYMMDD format to {MM/DD/YYYY}

Discussion

The STOD() function converts a character representation of a date into a date value. STOD() generates an error if the input is invalid.

Example

dim char_date as C = "19500512"
? stod(char_date)
= {05/12/1950}

See Also